class AnnouncementListItemData {
  String id;
  String title;
  final String time;
  final String publisher;
  final String content;
  final String importantLevel;

  AnnouncementListItemData(
    this.id,
    this.title,
    this.time,
    this.publisher,
    this.content,
    this.importantLevel,
  );

  static AnnouncementListItemData fromMap(Map<String, dynamic> map) {
    return AnnouncementListItemData(
      map['id'].toString(),
      map['title'],
      map['time'].toString().substring(0, 10),
      map['name'],
      map['content'],
      map['importantLevel'],
    );
  }
}
